Combine the flour and butter in a food processor until the mixture resembles bread crumbs. Add the remaining ingredients and process until the mixture forms a ball. Form a disk, wrap in plastic and refrigerate 1 hour. Preheat the oven to 425F. Roll out the pastry to a 1/4-inch thickness and line a 9 or 10-inch pie pan. Bake the crust blind for 25 minutes. To make the filling: melt the butter in a frying pan and cook the pears until softened. Sprinkle the sugar over the pears and cook over the maximum heat until the sugar caramelizes. Cool the pie crust on a rack. Fill it with the pear mixture. Sprinkle with the almonds.